package com.gewu.pm.ui.fragment.delivery;

import android.widget.TextView;

import com.gewu.pm.R;
import com.gewu.pm.app.AppFragment;
import com.gewu.pm.ui.activity.customer.DeliveryProviderDetailsActivity;

/**
 * 配送商详情 - 详情Tab
 * 
 * 功能：
 * 1. 显示配送商基本信息
 * 2. 所有数据在XML中写死，可通过findViewById获取后赋值
 */
public final class DeliveryDetailFragment extends AppFragment<DeliveryProviderDetailsActivity> {

    private TextView mFullNameView;
    private TextView mSalespersonView;
    private TextView mSalesAreaView;
    private TextView mDepartmentView;
    private TextView mCompanyView;
    private TextView mRouteView;
    private TextView mCooperationStatusView;
    private TextView mDeliveryTimeView;

    /**
     * 创建Fragment实例
     */
    public static DeliveryDetailFragment newInstance() {
        return new DeliveryDetailFragment();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.delivery_detail_fragment;
    }

    @Override
    protected void initView() {
        mFullNameView = findViewById(R.id.tv_full_name);
        mSalespersonView = findViewById(R.id.tv_salesperson);
        mSalesAreaView = findViewById(R.id.tv_sales_area);
        mDepartmentView = findViewById(R.id.tv_department);
        mCompanyView = findViewById(R.id.tv_company);
        mRouteView = findViewById(R.id.tv_route);
        mCooperationStatusView = findViewById(R.id.tv_cooperation_status);
        mDeliveryTimeView = findViewById(R.id.tv_delivery_time);
    }

    @Override
    protected void initData() {
        // 数据已在XML中写死，可根据需要动态赋值
        // 示例：
        // mFullNameView.setText("XX-配送商（杭州小配送1号车）");
        // mSalespersonView.setText("震辉");
        // ...
    }
}

